package com.haixiaoke.saas.workOrder.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haixiaoke.saas.common.annotation.Excel;
import com.haixiaoke.saas.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * 工单对象 biz_work_order
 *
 * @author panda
 * @date 2024-09-02
 */
@Data
public class WorkOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 工单id
     */
    @Excel(name = "工单编号")
    private String workOrderId;

    /**
     * 工单类型(1.维修单,2.保洁单,3.看房单)
     */
    private String workOrderType;

    /**
     * 工单状态(1.待派单,2.待接单,3.已接单,4.处理中,5.待缴费,6.已完成,7.已取消,8.待审核)
     */
    @Excel(name = "工单状态", readConverterExp = "1=待派单,2=待接单,3=已接单,4=处理中,5=待缴费,6=已完成,7=已取消,8=待审核",
                combo = {"待派单", "待接单", "已接单", "处理中", "待缴费", "已完成", "已取消", "待审核"})
    private String workOrderState;

    /**
     * 房屋id
     */
    private String houseId;

    /**
     * 小区地址
     */
    @Excel(name = "地址", width = 30)
    private String premisesAddress;

    /**
     * 楼盘id
     */
    private String estateId;

    /**
     * 维修类型(1.个人维修,2.公共维修)
     */
    @Excel(name = "报修类型", readConverterExp = "1=个人维修,2=公共维修", combo = {"个人维修", "公共维修"})
    private String maintenanceType;

    /**
     * C端用户id
     */
    private Long conUserId;

    /**
     * 联系人姓名
     */
    @Excel(name = "报修人")
    private String contactsName;

    /**
     * 联系人手机号
     */
    @Excel(name = "报修人手机号")
    private String contactsPhone;

    /**
     * 工单备注信息
     */
    @Excel(name = "备注信息")
    private String workOrderRemark;

    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "预约时间", width = 24, dateFormat = "yyyy-MM-dd HH:mm")
    private Date appointmentTime;

    /**
     * 期望入住时间(1.立即入住,2.一周内,3.一个月内,4.先看看)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "期望入住时间", readConverterExp = "1=立即入住,2=一周内,3=一个月内,4=先看看", combo = {"立即入住", "一周内", "一个月内", "先看看"})
    private String expectCheckInType;

    /**
     * 紧急程度(1.普通,2.紧急,3.非常紧急)
     */
    @Excel(name = "紧急程度", readConverterExp = "1=普通,2=紧急,3=非常紧急", combo = {"普通", "紧急", "非常紧急"})
    private String urgencyDegree;

    /**
     * 故障照片
     */
    //@Excel(name = "故障照片")
    private String faultPicture;

    /**
     * 工单来源(1.平台,2.B端小程序,3.C端小程序)
     */
    @Excel(name = "工单来源(1.平台,2.B端小程序,2.C端小程序)")
    private String workOrderSource;

    /**
     *期望B端用户id
     */
    private Long expectBusUserId;

    /**
     *期望工单人员租户id
     */
    private String expectPersonTenantId;

    /**
     *期望工单人员名称
     */
    private String expectPersonName;

    /**
     * B端用户id
     */
    private Long busUserId;

    /**
     * 工单人员租户id
     */
    private String personTenantId;

    /**
     * 工单人员名称
     */
    @Excel(name = "维修员名称")
    private String personName;

    /**
     * 工单人员手机号码
     */
    @Excel(name = "维修员手机号码")
    private String personPhone;

    /**
     * 预估上门时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "预估上门时间", width = 24, dateFormat = "yyyy-MM-dd HH:mm")
    private Date estimateTime;

    /**
     * 接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date receiveOrderTime;

    /**
     * 处理时限(1.1小时,2.2小时,3.4小时,4.1天,5.2天,6.3天,7.不限制)
     */
    private String disposeTimeLimit;

    /**
     * 是否评价(0.否,1.是)
     */
    private String estimationFlag;

    /**
     * 是否超时(0.否,1.是)
     */
    private String timeoutFlag;

    /**
     * 支付方(0.个人,1.平台)
     */
    private String payer;

    /**
     * 处理前照片
     */
    private String workOrderBeforePicture;

    /**
     * 处理前时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date workOrderBeforeTime;

    /**
     * 处理后照片
     */
    private String workOrderAfterPicture;

    /**
     * 处理后时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date workOrderAfterTime;

    /**
     * 看房图片
     */
    private String attendantPicture;

    /**
     * 工单金额
     */
    private BigDecimal workOrderAmount;

    /**
     * 工单维修完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "工单维修完成时间", width = 24, dateFormat = "yyyy-MM-dd HH:mm")
    private Date workCompletedTime;

    /**
     * 工单说明
     */
    private String workOrderExplain;

    /**
     * 支付凭证
     */
    private String paymentDocument;

    /**
     * 支付类型: 1扫码支付 2小程序支付 3支付凭证
     */
    private String paymentType;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date paymentTime;

    /**
     * 显示状态(0.显示,1.隐藏)
     */
    private String showState;

    /**
     * 故障照片集合
     */
    private List<String> faultPictureList;

    /**
     * 处理前照片集合
     */
    private List<String> workOrderBeforePictureList;

    /**
     * 处理后照片集合
     */
    private List<String> workOrderAfterPictureList;

    /**
     * 看房图片集合
     */
    private List<String> attendantPictureList;

    /**
     * 维修费用项目集合
     */
    private List<WorkOrderChargeItem> workOrderChargeItemList;

    /**
     * 工单跟进记录
     */
    private WorkOrderRecord workOrderRecord;

    /**
     * 接单状态的工单记录
     */
    private WorkOrderRecord receivedWorkOrderRecord;
    private List<WorkOrderRecord> workOrderRecordList;


    /**
     * 维修单评价
     */
    private WorkOrderEvaluate workOrderEvaluation;

    /**
     * 维修项目名称
     */
    @Excel(name = "维修项目")
    private String itemName;

    @Excel(name = "申请时间", width = 24, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 跟进记录的显示类型
     */
    private String userDisplayType;

    /**
     * B端用户id集合
     */
    private List<Long> busUserIds;

    /**
     * 维修租户id集合
     */
    private List<String> personTenantIds;

    /**
     * 维修租户id集合
     */
    private List<String> workOrderIds;


    /**
     *  工单临时密码申请状态：0.未申请 1.已申请 2.已拒绝
     */
    private String temporaryPwdApplyState;

    /**
     *  楼盘名称
     */
    private String estateName;
}
